package kong_gui_items;

import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ModalityHelperDisplay extends BaseGraphics {

	private static final long serialVersionUID = 7347533469347933333L;
	String [] othersDialogues;
	
	int VOICE_AND_PRESS = 0;
	int PRESS_AND_SHOOT = 1;
	int PRESS_AND_HIT = 2;
	
	public ModalityHelperDisplay(int x, int y) {
		
		super(x, y, ".\\Resources\\Picts\\Voice and press.png", false);
		this.setVisible(true);
		
		othersDialogues = new String[]{".\\Resources\\Picts\\Voice and press.png",
									   ".\\Resources\\Picts\\PressAndShoot.png",
									   ".\\Resources\\Picts\\PressAndHIT.png"};
		
		File fileImg = new File(imageName);
		
		try { image = ImageIO.read(fileImg); } catch (IOException e) {
			image = null;
			System.err.println("Fichier invalide");
		}		
	}

	public void DisplayWaitForVoice (){
		try {image = ImageIO.read(new File(othersDialogues[VOICE_AND_PRESS]));	} 
		catch (IOException e) {e.printStackTrace();}
	}
	
	public void DisplayWaitForShoot (){
		try {image = ImageIO.read(new File(othersDialogues[PRESS_AND_SHOOT]));	} 
		catch (IOException e) {e.printStackTrace();}
	}
	
	public void DisplayWaitForHit (){
		try {image = ImageIO.read(new File(othersDialogues[PRESS_AND_HIT]));	} 
		catch (IOException e) {e.printStackTrace();}
	}
	
}
